package Day2_2;

public class Truck extends GPS{
    public String number;//车辆车牌
    public String model;//车辆型号
    public String transporter;//运货人

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getTransporter() {
        return transporter;
    }

    public void setTransporter(String transporter) {
        this.transporter = transporter;
    }

    public Truck(String number, String model, String transporter){
        this.number=number;
        this.model=model;
        this.transporter=transporter;
    }

    //运输方法
    public void transport(){
        System.out.println("货物正在运输......");
    }

    @Override
    public String getPosition() {
        String position="北京";
        System.out.println("货物当前位置是："+position);
        return position;
    }


}
